const { sqlQuery } = require('../db/mysql')
const login = async (u, p) => {
  let sql = `select * from user where username='${u}' and password=${p}`
  const res = await sqlQuery(sql)
  if (res.length > 0) {
    return res[0]
  } else false
}
module.exports = login
